package api

import request "gitee.com/changeden/volcengine-livesaas-request-go"

type ListMediasRequest struct {
	IsNeedTotalCount *bool   `json:"IsNeedTotalCount"`
	PageNo           *int32  `json:"PageNo"`
	PageItemCount    *int32  `json:"PageItemCount"`
	ActivityId       *int64  `json:"ActivityId"`
	Name             *string `json:"Name"`
	Vid              *string `json:"Vid"`
}
type ListMediasResponse []ListMedias
type ListMedias struct {
	MediaId      int64  `json:"MediaId"`
	Name         string `json:"Name"`
	Duration     int32  `json:"Duration"`
	SourceType   int32  `json:"SourceType"`
	OnlineStatus int32  `json:"OnlineStatus"`
	Vid          string `json:"vid"`
	CreateTime   int64  `json:"CreateTime"`
	CoverImage   string `json:"CoverImage"`
}

func (instance *Instance) ListMedias(data *ListMediasRequest) (*ListMediasResponse, error) {
	d := request.Data{
		Action: "ListMediasAPI",
	}
	bindQuery(&d, *data)
	var res ListMediasResponse
	err := instance.get(&d, &res)
	return &res, err
}
